package com.hbnu.tangyalu;

import java.io.IOException;

public class PipeStreamTest {
    public static void main(String[] args) {
        Send send=new Send();
        Receive receive=new Receive();
        try {
            send.getPipedOutputStream().connect(receive.getPipedInputStream());

        }
        catch (IOException e){
            e.printStackTrace();
        }
        new Thread(send).start(); //启动线程
        new Thread(receive).start();
    }
}
